<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:p="http://primefaces.org/ui">

<f:loadBundle basename="resources.application" var="msg"/>

<h:head>
	<link rel="stylesheet" type="text/css" href="CSS/stylesheet.css"></link>
	<title><h:outputText value="#{msg.registerTitle}" /></title>
</h:head>

<h:body>	
	<h:form id="registerForm">
		<p:outputLabel for="firstName" value="#{msg.firstName}:"></p:outputLabel>
		<p:inputText id="firstName" value="#{customerController.customer.firstName}" required="true"></p:inputText>
		<br/>
		<br/>			
		<p:outputLabel for="lastName" value="#{msg.lastName}:"></p:outputLabel>
		<p:inputText id="lastName" value="#{customerController.customer.lastName}" required="true"></p:inputText>
		<br/>
		<br/>				
		<p:outputLabel for="birthDate" value="#{msg.birthDate}:"></p:outputLabel>
		<p:calendar id="birthDate" value="#{customerController.customer.birthDate}" required="true"></p:calendar>		
		<br/>
		<br/>			
		<p:outputLabel for="email" value="#{msg.email}:"></p:outputLabel>
		<p:inputText id="email" value="#{customerController.customer.email}" required="true"></p:inputText>
		<br/>
		<br/>			
		<p:outputLabel for="password" value="#{msg.password}:"></p:outputLabel>
		<p:password id="password" value="#{customerController.customer.password}" required="true" match="retypePassword"></p:password>
		<br/>
		<br/>		
		<p:outputLabel for="retypePassword" value="#{msg.retypePassword}:"></p:outputLabel>
		<p:password id="retypePassword" value="#{customerController.customer.password}" required="true"></p:password>
		<br/>
		<br/>						
		<p:commandButton id="registerButton" style="width: 228px" value="#{msg.register}" update="registerForm" action="#{customerController.createCustomer}"></p:commandButton>
		<p:link id="registeredAlready" value="#{msg.registeredAlready}" href="login.xhtml"></p:link>
	</h:form>
	<hr/>
	<i>#{msg.copyright}</i>
</h:body>
</html>
